/*  File Name	: SandBoxService.h
 *  Author		: Javie Pong
 *	 E-mail		: 823960168@qq.com
 *  Created on	: 2012-10-31
 *  Description:
 */

#ifndef SANDBOXSERVICE_H_
#define SANDBOXSERVICE_H_
#include "Service.h"

class SandBoxMonitor;

class SandBoxService:public ServiceEX<SandBoxMonitor>
{
public:
	SandBoxService(int p=0);
	virtual ~SandBoxService();

	virtual int open(void *p =0);

	virtual int handle_input(int  fd = INVALID_HANDLER);

	virtual int handle_output(int fd = INVALID_HANDLER);

	virtual int handle_timeout(void);

	virtual int handle_close(int handle = INVALID_HANDLER,
			ReactorMask mask= EventHandler::ALL_MASK);

	virtual int recv_msg(const int limit_size = 1024*60);

	void reset(void);

private:
	typedef ServiceEX<SandBoxMonitor> super;

};

#endif /* SANDBOXSERVICE_H_ */
